// 菜单管理
<template>
  <div>
    <!-- 全局注册 table 组件 -->
    <BaseTable :columnList="columnList"
               :url="url"
               :pageData="pageData"
               @handleSizeChange="handleSizeChange"
               @handleCurrentPageChange="handleCurrentPageChange"></BaseTable>

  </div>
</template>

<script>

export default {
  data: function () {
    return {
      // 表格动态列
      columnList: [
        { label: '编号', prop: 'id', element: 'el-input' },
        { label: '菜单名称', prop: 'title', element: 'el-input' },
        { label: '父级 ID', prop: 'parentId', element: 'el-input' },
        { label: '菜单地址', prop: 'url', element: 'el-input' },
        { label: '创建时间', prop: 'recordTime', element: 'el-date-picker' }
      ],
      // 工具栏对应的 url
      url: {
        page: { url: '/menu/page', module: 'core', type: 'post' }
      }
    }
  },
  computed: {

  },
  methods: {
    initPageParam () {
      this.url.page.param = { userid: this.$backutils.user().id }
    }
  },
  created () {
    // 请求菜单接口
    this.initPageParam()
  }
}
</script>
